package com.dylearn.utils;

import lombok.Data;

@Data
public class R {
    //这个是统一数据格式的工具类
    Boolean flag;
    Object data;
    String msg;

    R(){ }

    //然后创建两个有参构造方法，进行赋值
    public R(Boolean flag){
        this.flag = flag;
    }

    public R(Boolean flag,Object data){
        this.flag = flag;
        this.data = data;
    }
    public R(Boolean flag,Object data,String msg){
        this.data = data;
        this.flag = flag;
        this.msg = msg;
    }
    public R(Boolean flag,String msg){
        this.flag = flag;
        this.msg = msg;
    }

    public R(String msg){
        this.flag = false;
        this.msg = msg;
    }

}
